import request from '@/utils/request'



// 1. 导出消息通道列表 (POST /system/basicMessageChannel/export)
export function exportMessageChannel(data) {
  return request({
    url: '/basic/system/basicMessageChannel/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

// 2. 获取配置字典列表 (GET /system/basicMessageChannel/getMessageTypeDictList)
export function getMessageTypeDictList(params) {
  return request({
    url: '/basic/system/basicMessageChannel/getMessageTypeDictList',
    method: 'get',
    params: params

  })
}

// 3. 获取中间件字典列表 (GET /system/basicMessageChannel/getMiddleDictList)
export function getMiddleDictList() {
  return request({
    url: '/basic/system/basicMessageChannel/getMiddleDictList',
    method: 'get'
  })
}

// 4. 查询消息通道列表 (GET /system/basicMessageChannel/list)
export function listMessageChannel(params) {
  return request({
    url: '/basic/system/basicMessageChannel/list',
    method: 'get',
    params: params
  })
}

// 5. 获取消息通道详细信息 (GET /system/basicMessageChannel/{messageChannelId})
export function getMessageChannel(messageChannelId) {
  return request({
    url: `/basic/system/basicMessageChannel/${messageChannelId}`,
    method: 'get'
  })
}

// 6. 新增消息通道 (POST /system/basicMessageChannel)
export function addMessageChannel(data) {
  return request({
    url: '/basic/system/basicMessageChannel',
    method: 'post',
    data: data
  })
}

// 7. 修改消息通道 (PUT /system/basicMessageChannel)
export function updateMessageChannel(data) {
  return request({
    url: '/basic/system/basicMessageChannel',
    method: 'put',
    data: data
  })
}

// 8. 删除消息通道 (DELETE /system/basicMessageChannel/{messageChannelIds})
export function deleteMessageChannel(messageChannelIds) {
  return request({
    url: `/basic/system/basicMessageChannel/${messageChannelIds}`,
    method: 'delete'
  })
}